<%@page contentType="text/html; charset=utf-8"%>
<html>
	<head>
		<title>share管理平台登陆</title>
		<meta http-equiv="content-type" content="text/html; charset=UTF-8">
		<script type="text/javascript" src="${path}/js/jquery.js"></script>
		<link rel="Shortcut Icon" type="image/x-icon"href="${path}/images/favicon.ico" />
		<style type="text/css">
			<!--
			body {margin:0px;overflow: hidden;}	img {border: 0px;}.style3 {color: #528311;font-size: 12px;}	.style4 {color: #42870a;font-size: 12px;}
			-->
		</style>
		<script type="text/javascript">
			/**
			 * 验证登录
			 * @return
			 */
			function checkLogin1() {
				var empAccount = $("#u").val() ;
				var empPassword = $("#p").val() ;
				
				var errorInfo = $("#dddd") ;
				if(empAccount != "" && empPassword != "") {
					var url = "../privilegeEmpJson!checkLogin.action?time="+new Date().getTime() ;
					var dataVal = {empAccount:empAccount,empPassword:empPassword} ;
					errorInfo.html("与后台交互中，请稍等&nbsp;<img src='../images/18.gif' />");
					$.ajax({
						url:url,
						data:dataVal,
						type:"post",
						//dataType: "json",
						//error: function(XmlHttpRequest, textStatus, errorThrown) { alert(textStatus); },
						success:function(json) {
							var data = eval("("+json+")") ;
							if(data.result=="1") {
								errorInfo.html("该账号不存在，或账号密码错误！") ;
							} else if(data.result=="2") {
								errorInfo.html("该账号已经失效，员工为离职状态！") ;
							} else if(data.result=="3") {
								errorInfo.html("验证成功，进入管理界面！") ;
								setTimeout("window.location.href=\"index.jsp\"", 0) ;
							} 
						}
					});
				} else {
					errorInfo.html("账号或密码不能为空！") ;
				}
			}
			/** 验证界面重置按钮 */
			function checkLogin1Reset() {
				var empAccount = $("#u").val("") ;
				var empPassword = $("#p").val("") ;
			}
		</script>
	</head>

	<body>

			<table width="100%" height="100%" border="0" cellpadding="0"
				id="centent" cellspacing="0">
				<tr>
					<td height="608" background="${path}/images/login/login_03.gif">
						<table width="862" border="0" align="center" cellpadding="0"
							cellspacing="0">
							<tr> 
								<td height="266" align="center" valign="bottom" background="${path}/images/login/login_04.gif">
									&nbsp;
									<div id="dddd" style="font-size:12px;color:red;padding-top:3px;margin-left:170px;width:200px; height:20px;"></div>
								</td>
							</tr>
							<tr>
								<td height="95" id="content">
									<table width="100%" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td width="424" height="95"
												background="${path}/images/login/login_06.gif">
												&nbsp;
											</td>
											<td width="183"
												background="${path}/images/login/login_07.gif">
												<table width="100%" border="0" cellspacing="0"
													cellpadding="0">
													<tr>
														<td width="21%" height="30">
															<div align="center">
																<span class="STYLE3">用户</span>
															</div>
														</td>
														<td width="79%" height="30">
															<input type="text" id="u" name="empname" value="yanghaoquan"
																style="height: 18px; width: 130px; border: solid 1px #cadcb2; font-size: 12px; color: #81b432;">
														</td>
													</tr>
													<tr>
														<td height="30">
															<div align="center">
																<span class="STYLE3">密码</span>
															</div>
														</td>
														<td height="30">
															<input type="password" id="p" name="emppwd" value="yanghaoquan"	
																style="height: 18px; width: 130px; border: solid 1px #cadcb2; font-size: 12px; color: #81b432;">
														</td>
													</tr>
													<tr>
														<td height="30">
															&nbsp;
														</td>
														<td height="30">
															<input type="image" src="${path}/images/login/login.jpg" onclick="checkLogin1()">
															<span onclick="checkLogin1Reset()" style="cursor: pointer"><img src="${path}/images/login/reset.jpg"></span>
														</td>
													</tr>
												</table>
											</td>
											<td width="255"
												background="${path}/images/login/login_08.gif">
												&nbsp;
											</td>
										</tr>
									</table>
								</td>
							</tr>
							<tr>
								<td height="247" valign="top"
									background="${path}/images/login/login_09.gif">
									<table width="100%" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td width="22%" height="30">
												&nbsp;
											</td>
											<td width="56%">
												&nbsp;
											</td>
											<td width="22%">
												&nbsp;
											</td>
										</tr>
										<tr>
											<td>
												&nbsp;
											</td>
											<td height="30">
												<table width="100%" border="0" cellspacing="0"
													cellpadding="0">
													<tr>
														<td width="44%" height="20">
															&nbsp;
														</td>
														<td width="56%" class="STYLE4">
															版本 2008V1.0
														</td>
													</tr>
												</table>
											</td>
											<td>
												&nbsp;
											</td>
										</tr>
									</table>
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		
	</body>
</html>
